package com.hawthorn.admin.service.sysmenu;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hawthorn.entity.dto.SysUserFavoriteDTO;
import com.hawthorn.entity.dto.SysUserRecentDTO;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * <p>todo 系统菜单服务接口 </p>
 * @author: andyten@tom.com | xukaixing@hotmail.com
 * @created: 2021/12/1 11:13 AM
 * @version v1.0.1
 * @copyright: Copyright (c)  andyten
 */
public interface SysMenuService
{

  List<SysUserRecentDTO> findUserRecentMenus(Long userId);

  List<SysUserFavoriteDTO> findUserFavoriteMenus(Long userId);

  boolean delRecentMenu(Long userId, Long menuId);

  boolean delFavoriteMenu(Long userId, Long menuId);

  void saveRecentMenu(Long userId, String userAccount, Long menuId);

  void saveFavoriteMenu(Long userId, String userAccount, Long menuId);

  IPage<Map<String, Object>> findMenu(String conditions, Page<Map<String, Object>> page);

  Map<String, Object> saveMenu(Map<String, Object> params);

  Map<String, Object> updateMenu(Long id, Map<String, Object> params);

  Integer removeMenu(Long id);

  void exportMenuData(HttpServletResponse response, String fileName, Map<String, Object> param)throws IOException;

  Integer changeStatus(long id, String params);
}
